home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12236 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: airdmhor.gen.nz!not-for-mail
  2. From: gumboot@airdmhor.gen.nz (Simon Hosie)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: "Best fit" algorithm (help)
  5. Date: 30 Mar 1996 10:04:32 +1200
  6. Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
  7. Message-ID: <4jhmpg$666@airdmhor.gen.nz>
  8. References: <APC&7'0'22b6b83'874@peg.apc.org> <4j9215INNgbo@keats.ugrad.cs.ubc.ca> <4jbb9d$g14@news.xs4all.nl> <4jbvvaINNsqi@mayne.ugrad.cs.ubc.ca>
  9. NNTP-Posting-Host: airdmhor.gen.nz
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. In article <4jbb9d$g14@news.xs4all.nl>, Falstaff <falstaff@xs4all.nl> wrote:
  13. > Hmmm.  I think the user wants to minimize just that (unused space).
  14.  
  15. Kazimir Kylheku:
  16. > The quoted paragraph clearly states an objective involving the maximum _number_
  17. > of songs, as well as the objective of finding a good fit.
  18.  
  19.   I get the impression that the original poster had a list of songs, all of
  20. which they wanted to get on tape with minimal wastage.  I know it's not
  21. exactly what they said (and I hate it when people do this to me) but it
  22. seems like what they would most likely want.
  23.  
  24.  
  25. In article <4jbb9d$g14@news.xs4all.nl>, Falstaff <falstaff@xs4all.nl> wrote:
  26. > To do that, you should pick the *largest* item that will still fit.
  27.  
  28. Kazimir Kylheku:
  29. > Such a greedy strategy will unfortunately exhaust the available space using the
  30. > least number of songs. You also need to implement some sort of backtracking to
  31. > find the optimal solution.
  32.  
  33.  
  34.   Why not copy the smallest song over and over to every tape?
  35.  
  36.  
  37.   I used to sort files largest to smallest and copy them to disk with
  38. XTGold, every time it asked for a new disk I would try all the used disks
  39. before I used a fresh disk.  Was that the method described?
  40.